package com.example.bootcurriculumproject.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.bootcurriculumproject.entity.Ship;
import com.example.bootcurriculumproject.mapper.ShipMapper;
import com.example.bootcurriculumproject.service.ShipService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ShipServiceImpl extends ServiceImpl<ShipMapper,Ship> implements ShipService {
    @Autowired
    ShipMapper shipMapper;
    public List<Ship> selectAll(){
        return shipMapper.selectAll();
    }
    public void addShip(Ship ship){
        shipMapper.addShip(ship);
    }
    public void deleteShip(Long addressnum){
        shipMapper.deleteaddressnum(addressnum);
    }
    public void updateShip(Ship ship){
        shipMapper.updateAddresssShip(ship);
    }
    public Ship selectByAddressnum(Long addressnum){
        return shipMapper.selectByAddressnum(addressnum);
    }
}
